<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
	<title>div顺序重置</title>
	<script src="./lib/jquery-1.11.3.min.js"></script>
</head>
<body>
	<div id="wp"></div>
	<input type="radio" value="sdfsdf" name="qwe" id="asd" data-val="az">
	<input type="radio" value="zxcv" name="qwe" id="lkj" data-val="ax">
	<script>
		window.onload = function() {
			console.log(789);
			var arr = [	{asd:1},{asd:2},{asd:3},{asd:4},{asd:5},{asd:6},{asd:7},{asd:8}];
			var str='';
			$.each(arr, function(i, obj) {
				str+=`<div>`+obj.asd+`</div>`;//手机浏览器不支持`，直接无法运行整个js
			});
			$('#wp').html(str);
		}		
		window.onunload=function() {//刷新||关闭时触发，alert会报错，先于onload事件
			console.log('123456');
			// $('body').css('background','red');

		}
				
				
			
				
			
	</script>
</body>
</html>